import httpInstance from '../utils/http';

/**
 * @description 与该用户建立通信连接
 * @param userId 自己的id
 * @param targetId 目标用户的id
 * @returns
 */
export function EstablishConnectionApi(userId, targetId) {
  return httpInstance.post('/chat/establishConnection', {

    userId,
    targetId,

  });
}


/**
 * @description 发送消息
 * @param userId 自己的id
 * @param targetId 目标用户的id
 * @param number 消息内容
 * @returns
 */
export function deleteUnreadChatMessageApi(userId, targetId, number) {
  return httpInstance.delete('/chat/deleteUnreadMessage', {
    data: {
      userId,
      targetId,
      number
    }
  });
}


export function deleteChatApi(userId, targetId) {
  return httpInstance.delete('/chat/deleteChat', {
    data: {
      userId,
      targetId
    }
  });
}